cmake_minimum_required(VERSION 2.4)

project(log)

include_directories(
	"${PROJECT_SOURCE_DIR}/logger"
	${Boost_INCLUDE_DIRS}
	)

set(SOURCES
	"source/Log.cpp"
	"source/LogStream.cpp"
	"source/Builder.cpp"

	"source/LogRunner.cpp"
	"source/LogDispatcher.cpp"


	# loggers
	"source/logger/OStreamLogger.cpp"
	"source/logger/FileLogger.cpp"

	# formatters
	"source/formatter/Formatter.cpp"
	"source/formatter/StringFormatter.cpp"
	"source/formatter/DatetimeFormatter.cpp"

	# logger creator
	"source/logger_creator/OStreamLoggerCreator.cpp"
	"source/logger_creator/FileLoggerCreator.cpp"

	# formatter creator
	"source/formatter_creator/StringFormatterCreator.cpp"
	"source/formatter_creator/DatetimeFormatterCreator.cpp"

	"source/detail/LogFormat.cpp"
	"source/detail/LogPriorityHelper.cpp"

	"source/LogBuilder.cpp"
	)

add_definitions(
	-O3 -g -W -Wall
)

add_library(log ${SOURCES})

add_executable(test 
    "source/main.cpp")

target_link_libraries(test
    log
	pthread
	${Boost_LIBRARIES}
	${LibConfig_LIBRARY})


